// Register an ajax event of 'requestcomplete' to check authorization.
Ext.Ajax.on("requestcomplete", function(conn, response, options) {
	if (response && response.getResponseHeader) {
		var errorCode = response.getResponseHeader("error_code");
		// TODO
	}
}, this);